/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package fxification.test;

import junit.framework.TestCase;
import junit.textui.TestRunner;

/**
 * @author vladimir
 */

public class ScheduledTaskTest extends TestCase{
    public function testTaskWork(): Void {
        def taskRunner = Task{
            work:function():Object{
                1 + 2
            }
        }
        Assert.assertNotNull("Action property not set", taskRunner.work);
        var result = taskRunner.work();
        Assert.assertTrue("Action fn not invoked correctly", result == 3);
    }
}

public function run() {
    def test = TestRunner{};
    test.run(test.getTest(ScheduledTaskTest.class.getName()));
}
